package com.tiger.cloud.model.ext;

import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.tiger.cloud.common.mybatis.TigerBaseEntity;
import com.tiger.cloud.model.rejection.Rejection;
import com.tiger.cloud.security.EncodeUtil;

import io.swagger.annotations.ApiModelProperty;

public class UserAndCompanyInfo extends TigerBaseEntity {

	private static final long serialVersionUID = 1L;

	private Long userId;
	private Long userInfoId;
	private String companyName;
	private String companyAttachment;
	private String privateAttachment;
	private String headImage;
	private String userName;
	private String privateInfo;
	@JsonIgnore
	private String privateInfo_;
	private String companyInfo;
	@JsonIgnore
	private String companyInfo_;
	private String qrCode;
	private String shareCode;
	private String loginId;
	private Date lastUpdateTime;
	private Integer integral;
	private BigDecimal balance;

	@ApiModelProperty(value = "融云Token")
	private String RYToken;
	
	private Rejection rejection;
	
	public Rejection getRejection() {
		return rejection;
	}

	public void setRejection(Rejection rejection) {
		this.rejection = rejection;
	}

	public String getShareCode() {
		return shareCode;
	}

	public void setShareCode(String shareCode) {
		this.shareCode = shareCode;
	}

	public Integer getIntegral() {
		return integral;
	}

	public void setIntegral(Integer integral) {
		this.integral = integral;
	}

	public Long getUserInfoId() {
		return userInfoId;
	}

	public void setUserInfoId(Long userInfoId) {
		this.userInfoId = userInfoId;
	}

	public String getPrivateAttachment() {
		return privateAttachment;
	}

	public void setPrivateAttachment(String privateAttachment) {
		this.privateAttachment = privateAttachment;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getCompanyName() {
		return companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	public String getCompanyAttachment() {
		return companyAttachment;
	}

	public void setCompanyAttachment(String companyAttachment) {
		this.companyAttachment = companyAttachment;
	}

	public String getHeadImage() {
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPrivateInfo() {
		if(null == privateInfo){
			return null;
		}
		try {
			return EncodeUtil.urlDecode(privateInfo);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
		return null;
	}

	public void setPrivateInfo(String privateInfo) {
		this.privateInfo = privateInfo;
	}
	public String getPrivateInfo_() {
		if(null == privateInfo){
			return null;
		}
		try {

			return EncodeUtil.urlEncode(privateInfo);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
		return null;
	}

	public void setPrivateInfo_(String privateInfo_) {
		if(null == privateInfo_){
			return;
		}
		try {
			this.privateInfo= EncodeUtil.urlDecode(privateInfo_);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
	}
	public String getCompanyInfo_() {
		if(null == companyInfo){
			return null;
		}
		try {
			return EncodeUtil.urlEncode(companyInfo);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
		return null;
	}

	public void setCompanyInfo_(String companyInfo_) {
		if( null == companyInfo_){
			return;
		}
		try {
			this.companyInfo= EncodeUtil.urlDecode(companyInfo_);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
	}
	public String getCompanyInfo() {
		if(null == companyInfo){
			return null;
		}
		try {
			return EncodeUtil.urlDecode(companyInfo);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		};
		return null;
	}

	public void setCompanyInfo(String companyInfo) {
		this.companyInfo = companyInfo;
	}

	public String getQrCode() {
		return qrCode;
	}

	public void setQrCode(String qrCode) {
		this.qrCode = qrCode;
	}

	public String getLoginId() {
		return loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public BigDecimal getBalance() {
		return balance;
	}

	public void setBalance(BigDecimal balance) {
		this.balance = balance;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public String getRYToken() {
		return RYToken;
	}

	public void setRYToken(String RYToken) {
		this.RYToken = RYToken;
	}
}
